package com.qys.livesMall.shop.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.qys.livesMall.shop.modal.entity.ShopOrderReturnExpress;
import com.qys.livesMall.shop.mapper.ShopOrderReturnExpressMapper;
import com.qys.livesMall.shop.service.ShopOrderReturnExpressService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author gmx
 * @since 2023-06-25
 */
@Service
public class ShopOrderReturnExpressServiceImpl extends ServiceImpl<ShopOrderReturnExpressMapper, ShopOrderReturnExpress> implements ShopOrderReturnExpressService {

    @Override
    public ShopOrderReturnExpress getExpress(Long approvedId, Integer shipper) {
        LambdaQueryWrapper<ShopOrderReturnExpress> wq=new LambdaQueryWrapper<>();
        wq.eq(ShopOrderReturnExpress::getApprovedId,approvedId);
        wq.eq(ShopOrderReturnExpress::getShipper,shipper);
        wq.last("limit 1");
        return getOne(wq);
    }
}
